package com.zzh.partnersys.im.session;

import io.netty.channel.Channel;

import java.util.List;
import java.util.Set;

/**
 * ������Ự�����??
 */
public interface WSTeamSession {

    /**
     * ����һ��������, ��������ڲ��ܴ�����?? ���򷵻� null
     * @param teamId ����(����id)
     * @param memberIDs ��Աuid
     * @return �ɹ�ʱ���������, ʧ�ܷ��� null
     */
    Set<Long> createTeam(Long teamId, Set<Long> memberIDs);

    /**
     * ��������??
     * @param teamId ����
     * @param uid ��Ա??
     * @return ����鲻���ڷ��� null, ���򷵻����??
     */
    Set<Long>  joinMember(Long teamId, Long uid);

    /**
     * �Ƴ����??
     *
     * @param teamId ����
     * @param uid    ��Ա??
     * @return ����鲻���ڷ��� null, ���򷵻����??
     */
    Set<Long> removeMember(Long teamId, Long uid);

    /**
     * �Ƴ�����??
     * @param teamId ����
     * @return ����鲻���ڷ��� null, ���򷵻����??
     */
    Set<Long> removeTeam(Long teamId);

    /**
     * ��ȡ�����е����г�ԱUID
     * @param teamId ����
     * @return ��Ա����, û�г�Ա�᷵??empty set
     */
    Set<Long> getMembers(Long teamId);

    /**
     * ��ȡ���Ա�� channel ����, ֻ������??channel �Ż᷵��
     * @param teamId ����
     * @return ��Ա channel ����
     */
    List<Channel> getMembersChannel(Long teamId);
}
